package com.yun.zf.common.admin.model.activity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class CouponAddMo {
    @ApiModelProperty(value = "活动id")
    @NotNull(message = "活动id不能为空")
    private Long activityId;
    @ApiModelProperty(value = "优惠券名称")
    @NotBlank(message = "优惠券名称不能为空")
    private String title;

    @ApiModelProperty(value = "副标题")
    private String subtitle;

    @ApiModelProperty(value = "优惠类型1满减、2立减、3折扣券")
    @NotNull(message = "优惠类型不能为空")
    private Integer type;

    @ApiModelProperty(value = "满多少金额")
    private BigDecimal withAmount;

    @ApiModelProperty(value = "用券金额")
    private BigDecimal usedAmount;

    @ApiModelProperty(value = " 发券数量")
    private Integer quota;

    @ApiModelProperty(value = "折扣比例，类型为折扣时必填")
    private BigDecimal discount;

    @ApiModelProperty(value = "有效期类型G固定，F 浮动")
    @NotBlank(message = "有效期类型不能为空")
    private String validityType;

    @ApiModelProperty(value = "固定开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date cStartTime;

    @ApiModelProperty(value = "固定结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date cEndTime;

    @ApiModelProperty(value = "限制天数，领取当日开始N天有效")
    private String limitDay;

    @ApiModelProperty(value = "状态")
    @NotBlank(message = "状态不能为空")
    private String status;

    @ApiModelProperty(value = "描述说明")
    private String description;
}
